#!/bin/sh
# - runtime
# - protocol
## iperf is a tool for active measurements of the maximum achievable
## bandwidth on IP networks. It supports tuning of various parameters
## related to timing, protocols, and buffers. For each test
## it reports the bandwidth, loss, and other parameters.

[ -n "$runtime" ] || runtime=300
[ "$protocol" = udp ] && opt_udp=-u

[ -n "$direct_server_ips" ] && server=$direct_server_ips
[ -z "$server" ] && server=127.0.0.1
server=${server%% *}

client_cmd="iperf3 -t $runtime -f M -J -c $server $opt_udp"

echo "$(date +'%F %T') ${client_cmd}" >> $RESULT_ROOT/reproduce.sh
${client_cmd}
